using System;
using System.Collections.Generic;
using System.Text;
using XinBang.DAL.NHibernate;
using XinBang.Entity;

namespace XinBang.BLL
{
    public class ArticleCatalogBL
    {
        private ArticleCatalogDA acd = new ArticleCatalogDA();

        public ArticleCatalog GetCatalogById(int id)
        {
            return (ArticleCatalog)acd.Get(id);
        }

        public void SaveCatalog(ArticleCatalog ac)
        {
            acd.Insert(ac);
        }

        public void UpdateCatalog(ArticleCatalog ac)
        {
            acd.Update(ac);
        }

        public IList<ArticleCatalog> GetAllCatalogs()
        {
            return acd.GetAllCatalogs();
        }

        public void DeleteCatalog(ArticleCatalog ac)
        {
            acd.Delete(ac);
        }
    }
}
